package x.ovo.wechat.bot.common.entity.event;

import x.ovo.wechat.bot.common.entity.message.Message;
import x.ovo.wechat.bot.common.event.Event;

/**
 * 消息事件
 *
 * @author ovo, created by 2024/05/02
 */
public class MessageEvent<T extends Message> extends Event<Message> {

    public MessageEvent(T source) {
        super(source);
    }

    @Override
    @SuppressWarnings("unchecked")
    public T getSource() {
        return (T) super.getSource();
    }

    public String getContent() {
        return getSource().getContent();
    }
}
